import './assets/main.css'
import 'element-plus/dist/index.css'
import '@/assets/iconfont/iconfont.css'
import '@/assets/font.css'
import 'undraw-ui/dist/style.css'

import { createApp, reactive } from 'vue'
import App from './App.vue'
import router from './router'

import ElementPlus from 'element-plus'
import * as icons from '@element-plus/icons'

// 组件库
import Vue3Lottie from 'vue3-lottie'

// 动画库
import 'animate.css/animate.min.css'

import store from './store'
// markdown编辑器
// 评论组件
import UndrawUi from 'undraw-ui'
// 富文本编辑器
import Vue3Tinymce from '@jsdawn/vue3-tinymce'

import Echarts from "vue-echarts"
import * as echarts from "echarts"




const app = createApp(App).use(store)
app.use(Vue3Lottie, { name: 'Vue3Lottie' })
app.use(ElementPlus)
app.use(UndrawUi)
app.use(Vue3Tinymce)
app.component("v-chart", Echarts)

app.config.globalProperties.$echarts = echarts

Object.keys(icons).forEach((key) => {
  app.component(key, icons[key])
})

const globalConfig = reactive({
  size: 'default'
})
app.use(ElementPlus, globalConfig)
app.provide('globalConfig', globalConfig)

app.use(router)

app.mount('#app')
